home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp 2.0.1 (Many Libraries) / Examples / Calc / CalcUtilities.p < prev    next >
Encoding:
Text File  |  1990-10-25  |  1.2 KB  |  57 lines  |  [TEXT/MPS ]

  1. {[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]}
  2. { CalcUtilities.p}
  3. { Copyright © 1986-1990 by Apple Computer, Inc. All rights reserved.}
  4.  
  5. {
  6.     This unit contains some utility routines for the Calc sample application.
  7.     It demonstrates how to use a library unit in a MacApp™ application.
  8. }
  9.  
  10. UNIT CalcUtilities;
  11.  
  12.     INTERFACE
  13.  
  14.         USES UMacApp;
  15.  
  16.             { Formatting and Drawing routines }
  17.  
  18.         PROCEDURE FitString(VAR theString: Str255;
  19.                             maxWidth: INTEGER);
  20.  
  21.         FUNCTION IsDigit(Ch: CHAR): BOOLEAN;
  22.  
  23.         PROCEDURE SetEditCmdName(theCommand, customCommand: INTEGER);
  24.  
  25.         PROCEDURE SetTheFont(fontNumber, fontSize: INTEGER;
  26.                              fontStyle: Style);
  27.  
  28.         PROCEDURE SmartDrawString(theString: Str255;
  29.                                   area: Rect;
  30.                                   justification: INTEGER);
  31.  
  32.         { Reading and Writing }
  33.  
  34.         PROCEDURE ReadBytes(theRefNum: INTEGER;
  35.                             size: LONGINT;
  36.                             buffer: Ptr);
  37.  
  38.         PROCEDURE WriteBytes(theRefNum: INTEGER;
  39.                              size: LONGINT;
  40.                              buffer: Ptr);
  41.  
  42.         PROCEDURE ReadScrap(theScrap: Handle;
  43.                             VAR scrapOffset: LONGINT;
  44.                             theData: Ptr;
  45.                             dataLength: INTEGER);
  46.  
  47.         PROCEDURE WriteScrap(theScrap: Handle;
  48.                              VAR scrapOffset: LONGINT;
  49.                              theData: Ptr;
  50.                              dataLength: INTEGER);
  51.  
  52.     IMPLEMENTATION
  53.  
  54.         {$I $$Shell(SrcApp)CalcUtilities.inc1.p}
  55.  
  56. END.
  57.